Completed
Push — master ( c12867...9cb664 )
by Junior
28s
created

actions.js ➔ ???   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
c 0
b 0
f 0
nc 1
dl 0
loc 10
rs 9.4285
nop 1

1 Function

Rating   Name   Duplication   Size   Complexity  
A actions.js ➔ ... ➔ ??? 0 1 1
1
import axios from 'axios'
2
import {createAction} from 'redux-actions'
3
4
export const GITHUB_FETCHING = 'modules/Github/FETCHING'
5
export const GITHUB_SUCCESS  = 'modules/Github/SUCCESS'
6
export const GITHUB_ERROR    = 'modules/Github/ERROR'
7
8
const githubFetching = createAction(GITHUB_FETCHING)
9
const githubError    = createAction(GITHUB_ERROR)
10
const githubSuccess  = createAction(GITHUB_SUCCESS)
11
12
export const getUserFromGithub = username => ({
13
    type : [
14
        githubFetching,
15
        githubSuccess,
16
        githubError
17
    ],
18
    payload : {
19
        data : () => axios.get('https://api.github.com/users/' + username)
20
    }
21
})
22